package com.jiuzhou.crawlers.taobao.processor.jd;

import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.Spider;
import us.codecraft.webmagic.processor.PageProcessor;

public class JdPricePreocessor implements PageProcessor {
	 private Site site = Site.me().setRetryTimes(3).setSleepTime(100);
	 static String text ="";
	@Override
	public void process(Page page) {
		  page.setSkip(true);
		 text = page.getRawText();
	}
	 public static String running(String url) {
		  Spider.create(new JdPricePreocessor()).addUrl(url).run();
		  return text;
		 }
	@Override
	public Site getSite() {
		// TODO Auto-generated method stub
		return site;
	}

}
